package com.lianzai.car.controller;

import com.lianzai.car.domain.CarInfoDO;
import com.lianzai.car.domain.CarLogDO;
import com.lianzai.car.service.CarInfoService;
import com.lianzai.car.service.CarLogService;
import com.lianzai.common.controller.BaseController;
import com.lianzai.common.utils.PageUtils;
import com.lianzai.common.utils.Query;
import com.lianzai.common.utils.R;
import com.lianzai.mobile.domain.CarPriceRelaDO;
import com.lianzai.mobile.domain.CarPriceRuleDO;
import com.lianzai.mobile.service.CarPriceRelaService;
import com.lianzai.mobile.service.CarPriceRuleService;
import org.apache.commons.collections.map.HashedMap;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 汽车表
 * 
 * @author zb
 * @email 1106900429@qq.com
 * @date 2018-11-30 22:09:40
 */
 
@Controller
@RequestMapping("/car/carlog")
public class CarLogController extends BaseController {
	@Autowired
	private CarLogService carLogService;


	@GetMapping()
	String CarLog(){
		return "car/carlog/carlog";
	}
	
	@ResponseBody
	@GetMapping("/list")
	public PageUtils list(@RequestParam Map<String, Object> params){
		//查询列表数据
        Query query = new Query(params);
		List<CarLogDO> carILogList = carLogService.list(query);
		int total = carLogService.count(query);
		PageUtils pageUtils = new PageUtils(carILogList, total);
		return pageUtils;
	}

	@GetMapping("/chooseCommunity")
	String chooseCommunity(){
		return "car/carlog/community";
	}
	
}
